home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
22
/
autofont.zip
/
FONTS.BAS
< prev
next >
Wrap
BASIC Source File
|
1987-11-13
|
3KB
|
116 lines
'
' Fonts.Bas - - to be compiled under MicroSoft QuickBasic 3.0
'
' A font downloader for the Hewlett-Packard LaserJet+, 500+, and Series II
' Printers. Written October 20, 1987 by Jeffrey R. Drumm.
'
' Version Number 1.0
'
' Rev. November 11, 1987 to clean up comments.
'
' Define String Conversion function to strip leading blanks from numbers.
'
Def FNNumToStr$(Num)
Let Num$ = Str$(Num)
Let Length = Len(Num$)
If Left$(Num$,1) <> "-" Then Length = Length - 1
Let FNNumToStr$ = Right$(Num$,Length)
End Def
'
' Setup Error handling
'
On Error Goto ErrorHandler
'
' Read command line, pass to a variable
'
Let CLine$ = Command$
'
' If command line is blank, assign default file name for font list.
'
If Cline$ = " " Then
Cline$ = "FONT.LST"
End If
'
' Show off my name
'
Cls
Print "FONTS: The Font Loader, for Hewlett-Packard LaserJet+ Soft Fonts."
Print " "
Print " by Jeffrey R. Drumm "
Print " ValCom Computer Center"
Print " 470 Forest Ave. "
Print " Portland, Maine 04101"
Print " 207-775-5055 "
'
' Initialize Printer
'
Lprint Chr$(27);"E";
'
' Open Font selection file
'
Open Cline$ for input as 1
'
' Set up Loop for Font Selection and ID assignment
'
Let FontID = 0
While Not EOF(1)
Let FontID = FontID + 1
Let FontID$ = FNNumToStr$(FontID)
'
' Assign Font ID number
'
Lprint Chr$(27);"*c";FontID$;"D";
'
' Get Font Name from disk file
'
Input #1, FontName$
'
' Build command line for Shell statement
'
Let CommandLine$ = "Copy " + FontName$ + " PRN: /b > NUL:"
'
' Display font name and ID number on screen
'
Locate FontID+8,1
Print "Downloading ";FontName$;" as font number ";FontID$
'
' Copy font to printer port
'
Shell CommandLine$
'
' Make font Permanent
'
Lprint Chr$(27);"*c5F";
Wend
Close #1
Cls
Locate 12,35
Print "All Done!"
'
' Provide user with audible signal that copying process is done.
' In this case, Beethoven's Fifth does the job.
'
Play "T180 O2 P2 P8 l8 GGG l2 E- P24 P8 l8 FFF l2 D"
'
' End of Program.
'
System
ErrorHandler:
cls
Print "Your Font Name file does not exist, or is not in the named"
Print "directory. The default filename is FONT.LST, in the current"
Print "directory. If your Font Name file is named or located differently,
Print "use the command:"
Print " "
Print "FONTS pathname\fontname.lst"
Print " "
Print "Where pathname is the drive and directory of the Font Name file, "
Print "and fontname.lst is the name of your font name file."
System